<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>02_CSS选择器</title>
    <style>
    #d2 span{
        background-color: red;
    }
    #d2>div>p>span{
        color: blue;
    }
    </style>
</head>
<body>
    <div>这是一个div</div>

    <div id="d2">
        <span>111</span>
        <div>
            <span>222</span>
            <p>测试文字</p>
            <p>测试<span>333</span>文字</p>
        </div>
        <span>444</span>
    </div>
</body>
</html>